package com.Register.service;

import cn.hutool.http.server.HttpServerResponse;
import com.Register.dto.*;
import com.Register.entity.VolunteerActivity;
import com.Register.es.ActivityDoc;
import com.Register.result.PageResult;
import com.Register.result.Result;
import com.Register.vo.SearchActivityByIdVO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fasterxml.jackson.core.JsonProcessingException;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.text.ParseException;

public interface VolunteerActivityService extends IService<VolunteerActivity> {
    /**
     * 创建志愿活动
     */
    void CreateActivity(CreateActivityDTO createActivityDTO) throws JsonProcessingException;

    /**
     * 分页查询志愿活动
     */
    PageResult ActivityPageQuery(ActivityPageQueryDTO activityPageQueryDTo) throws JsonProcessingException;

    /**
     *管理员更新活动相关信息
     */
    Result<String> UpdateActivity(ActivityUpdateDTO activityUpdateDTO) throws IOException, ParseException;

    /**
     * 用户报名志愿活动
     */
    Result<String> EnrollActivity(EnrollActivityDTO enrollActivityDTO);

    /**
     *我的志愿活动分页查询
     */
    PageResult getActivitiesByUserId(int currentPage, Long pageSize,Integer status);

    /**
     *根据id查询志愿活动
     */
    SearchActivityByIdVO searchActivityById(Long activityId);

    /**
     * 用户退出活动
     */
    Result<String> quitActivity(EnrollActivityDTO enrollActivityDTO);

    /**
     * 将参加志愿活动相关信息写入数据库
     */
    void createEnrollActivity(EnrollActivityTempDTO enrollActivityTempDTO);

    void exportUserInfoToExcel(Long activityId, HttpServletResponse httpServerResponse) throws IOException;

    void addDocument(ActivityDoc activityDoc) throws IOException;
}
